<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 3.0 License

Name       : Big Business
Description: A two-column, fixed-width design with a bright color scheme.
Version    : 1.0
Released   : 20120210
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="description" content="" />
<meta name="keywords" content="" />
<title>Big Business by Free CSS Templates</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div id="wrapper">
	<div id="header">
		<div id="logo">
			<h1><a href="#"><span id="soc_name1"></span></a></h1>
		</div>
	</div>
	<div id="menu">
		<ul>
			<li class="first current_page_item"><a href="#">Home</a></li>
			<li><a href="#">About us</a></li>
			<li class="last"><a href="#">Contact</a></li>
		</ul>
		<br class="clearfix" />
	</div>
	<div id="splash">
		<img class="pic" src="images/pic01.jpg" width="870" height="230" alt="" />
	</div>
	<div id="page">
		<div id="content">
			<div class="box">
				<h2>Welcome to <span id="soc_name2"></span></h2>
				<p>
					This is <strong><span id="soc_name3"></span></strong>'s Portal for its members. You can reach the committee
					online for your convenience to report issues or see any upcoming events with respect to the society. 
				</p>
			</div>
			
			<br class="clearfix" />
			<fieldset>
				<legend>Not yet signed up? Its simple.</legend>
				<div>
					<form action="LoginAuth" method="post" name="signupform">
					
						<table width="100%" cellspacing=20>
							<tr>
								<td>User Name (E-Mail ID)</td>
								<td><input type="text" name = "username" id="s_u" size=30 /></td>
							</tr>
							<tr>
								<td>Password</td>
								<td><input type="password" name = "password" size=30 /></td>
								
							</tr>
							<tr>
								<span id="signup_msg"></span>								
							</tr>
							
							<tr>
								<td colspan=2 style ="text-align:center;"><a href='javascript:void(0);' class='button_role' id='submit' onclick="signUp()">Sign Up</a></td>								
							</tr>
							
						</table>
						<input type="hidden" name = "id" value="signup" />
					</form>
				</div>
				
			</fieldset>
		</div>
		
		<form action="LoginAuth" method="post" id="loginform" name="loginform">
		<div id="sidebar">
			<div class="box" style="border: 1px solid #fafafa; padding: 2px 2px 2px 2px;">
				<h3>Member Login</h3>
				<ul class="list">
					<li class="first">
						<label for="username">Username</label>
						<input type="text" name="username" id="l_u" size="20px" />
					</li>
					<li>
						<label for="password">Password</label>
						<input type="password" name="password" size="20px" />
					</li>
					<li>
						<span id="login_msg"></span>
					</li>
					<input type="hidden" name = "id" value="signin" />
					<li class = "last">
						<a href='javascript:void(0);' class='button_role' id='submit' onclick="submitForm()">Sign In</a>
					</li>
				</ul>
			</div>
			
		</div>
		</form>
		<br class="clearfix" />
	</div>
	<div id="page-bottom">
		<div id="page-bottom-content">
			<h3>Footer</h3>
			<p>
				Deciding what will be the text
			</p>
		</div>
		<div id="page-bottom-sidebar">
			<h3>Pending</h3>
			<ul class="list">
				<li class="first"><a href="#">1</a></li>
				<li><a href="#">2</a></li>
				<li class="last"><a href="#">3</a></li>
			</ul>
		</div>
		<br class="clearfix" />
	</div>
<div id="footer">
	Copyright (c) 2012 dskakashganga.com. All rights reserved. Design by <a href="http://www.google.com/">Visit Google</a>.
</div>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>  
<script type="text/javascript">

	$(document).ready(function(){
		$.get("bind?id=soc_name",function(data){
			$("#soc_name1").html(data);
			$("#soc_name2").html(data);
			$("#soc_name3").html(data);
		});
	});
	
	function submitForm()
	{
		var email = document.forms["loginform"]["username"].value;
		if(validateEmail(email))
		{
			document.loginform.submit();
		}
	else
		{
			document.getElementById("login_msg").innerHTML = "<span style='color:red;'> Please enter email in correct form</span>";
		}
		
	}
	
	function signUp()
	{
		var email = document.forms["signupform"]["username"].value;
		if(validateEmail(email))
			{
				document.signupform.submit();
			}
		else
			{
				document.getElementById("signup_msg").innerHTML = "<span style='color:red;'> Please enter email in correct form</span>";
			}
		
	}
	
	function validateEmail(txtEmail){
		   var a = txtEmail;
		   var filter = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9]+[a-zA-Z0-9.-]+[a-zA-Z0-9]+.[a-z]{1,4}$/;
		    if(filter.test(a)){
		        return true;
		    }
		    else{
		        return false;
		    }
		}
</script>
</body>
</html>